<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title></title>
  <style type="text/css">
    .box {
      width: 50px;
      height: 50px;
      background: #CCCCCC;
      margin: 0 auto;
    }
  </style>
</head>

<body>
  <div id="box" class="box">

  </div>
</body>
<script type="text/javascript">
  var box = document.getElementById('box');
  var i = 0;
  box.onclick = function () {
    ++i;
    if (i % 2) {
      this.style.width = '200px';
      this.style.height = '200px';
      this.innerHTML = '大';
    } else {
      this.style.width = '50px';
      this.style.height = '50px';
      this.innerHTML = '小';
    }
  };
</script>

</html>